#include "base/logging.h"
#include "strings/split.h"

void SplitStringUsing(const string& str, char sep, vector<string>* v) {
  v->clear();
  if (str.size() == 0) {
    return;
  }
  int last = -1;
  for (int i = 0; i < str.size() + 1; ++i) {
    if (i == str.size() || str[i] == sep) {
      v->push_back(string(str.c_str() + last + 1, i - last - 1));
      last = i;
    }
  }
}
